package org.oslims.domain;

import java.util.Date;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.google.gwt.validation.client.*;

@Entity
@DiscriminatorValue("REPORT")
public class Report extends File {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1920290376487013454L;

	@ManyToOne
	@JoinColumn(name="LAB_STAFF_FK")
	@NotNull
	private LabStaff writtenBy;
	
	@Temporal(TemporalType.TIMESTAMP)
	@NotNull
	private Date writtenAt;
	
	@ManyToOne
	@JoinColumn(name="REQUEST_FK")
	@NotNull
	private Request request;
	
	public LabStaff getWrittenBy() {
		return writtenBy;
	}
	public void setWrittenBy(LabStaff writtenBy) {
		this.writtenBy = writtenBy;
	}
	public Date getWrittenAt() {
		return writtenAt;
	}
	public void setWrittenAt(Date writtenAt) {
		this.writtenAt = writtenAt;
	}
	public Request getRequest() {
		return request;
	}
	public void setRequest(Request request) {
		this.request = request;
	}
	
}
